<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>

<head>
    <title>Event Capture Test</title>

	<style type="text/css">
    </style>

	<script type="text/javascript" src="assets/js/mvc/util/eventCapture.js"></script>
</head>

<body>

<div>
	<p id="testP">
		<button id="testButton">Click on Me Before the Page Loads</button>
	</p>
	<p>*If you are on a fast connection, use CTRL-F5 to force the redownloading of all JavaScript.</p>
	<p id="content"></p>
</div>

<script type="text/javascript" src="assets/js/library.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/element/element.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/datasource/datasource.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/dragdrop/dragdrop.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/get/get.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/history/history.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/imageloader/imageloader.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/json/json.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/resize/resize.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/selector/selector.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yuiloader/yuiloader.js"></script> 
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/container/container.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/menu/menu.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/treeview/treeview.js"></script>

<script type="text/javascript">(function() {
	var i = 0,
		content = YAHOO.util.Dom.get('content'),
		timestr = 'before';

	YAHOO.util.Event.on('testButton', 'click', function() {
		content.appendChild(document.createTextNode('Click ' + i + ' ' + timestr + ' Page Loaded'));
		content.appendChild(document.createElement('br'));
		i += 1;
	});

	YAHOO.util.Event.on(window, 'load', function() {
		setTimeout(function() {
			i = 0;
			timestr = 'after';
		}, 250);
	});
})();
</script>

</body>
</html>